import React, { useEffect, useState } from 'react'
import http from '../../api/http'
import { NavBar, Toast, Card, Button } from 'antd-mobile'
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom'
function Index() {
    let navigate = useNavigate()
    // const { state } = useLocation()
    // const [sp] = useSearchParams()
    // const title = sp.get('title');
    // const price = state.price
    // const id = sp.get('id');
    // const payList = async () => {
    //     const res = await http.get('/api/pay', { params: { title, id, price } })
    //     console.log(res)
    // }
    // useEffect(() => {
    //     payList()
    // }, [])
    return (
        <div>
            <NavBar onBack={() => navigate(-1)}>支付</NavBar>
            <Button onClick={()=>Toast.show('支付成功')}>支付</Button>
        </div>
    )
}

export default Index
